{extend name="base" /} {block name="body"}
{block name="css"}
	<link rel="stylesheet" href="/public/oem/css/iconfont.css" />
	<link rel="stylesheet" href="/public/oem/css/css.css" />
{/block}
<div class="layui-body">
	<div class="navbar">
		<a><cite>商家联盟</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>订单列表</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">订单管理</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form layui-form-pane" action="{:url('order/index')}" method="get">
				<div class="layui-inline">
					<label class="layui-form-label">关键词</label>
					<div class="layui-input-inline">
						<input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<select name="ziduan">
						<option value="order_id" {if $ziduan=='order_id' }selected{/if}>订单ID</option>
						<option value="order_sn" {if $ziduan=='order_sn' }selected{/if}>订单编号</option>
					</select>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">订单类型</label>
					<div class="layui-input-inline">
					      <select name="status"   class="layui-input">
					        <option value=""></option>
					        <option value="1">待付款</option>
							<option value="2">待发货</option>
							<option value="3">待收货</option>
							<option value="4">已完成</option>
							<option value="11">预约</option>
							<!--<option value="1">待付款</option>
							<option value="9">待发货</option>
							<option value="10">待收货</option>
							<option value="2">已完成</option>
							<option value="11">预约</option>-->
					      </select>
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label">排序</label>
					<div class="layui-input-inline">
						<select name="param">
							<option value="add_time" {if $param=='add_time' }selected{/if}>下单时间</option>
							<option value="total_price" {if $param=='total_price' }selected{/if}>商品总价</option>
						</select>
					</div>
				</div>
				<div class="layui-inline">
					<select name="sort">
						<option value="asc" {if $sort=='asc' }selected{/if}>从低到高</option>
						<option value="desc" {if $sort=='desc' }selected{/if}>从高到底</option>
					</select>
				</div>
				<div class="layui-inline">
					<button class="layui-btn">搜索</button>
				</div>
			</form>
			<hr>
			<table class="layui-table">
				<thead>
					<tr>
						<th>ID</th>
						<th>物流号</th>
						<th>用户编号</th>
						<th>联系人</th>
						<th>联系号码</th>
						<th>商品总价</th>
						<th>支付价格</th>
						<th>订单状态</th>
						<th>下单时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{foreach name="order_list" item="vo"}
					<tr>
						<td>{$vo.order_id}</td>
						<td>{$vo.order_sn}</td>
						<td>{$vo.user_id}</td>
						<td>{$vo.consignee}</td>
						<td>{$vo.mobile}</td>
						<td>{$vo.total_price}</td>
						<td>{$vo.pay_price}</td>
						<td>
							{if $vo.status == 1}
							待付款
							{elseif $vo.status == 2}
							待发货
							{elseif $vo.status == 3}
							待收货
							{elseif $vo.status == 4}
							已完成
							{else}
							关闭
							{/if}
						</td>
						<td>{$vo.add_time}</td>
						<td>
							<a href="{:url('order/info',['id'=>$vo['order_id']])}" class="layui-btn layui-btn-normal layui-btn-small">详情</a>
							<a ref="delete_item?id={$vo.order_id}" class="layui-btn layui-btn-danger layui-btn-small confirm">删除</a>
						</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
			<!--分页-->
			{$order_list->render()}
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "{$controller}/index"
	};
</script>
{/block}